import { ITableParams } from "@/utils/types/table.ts";
import { IDictRes } from "@/utils/types/TRequest.ts";

export interface IDeptTableParams extends ITableParams {
  startTime?: string;
  endTime?: string;
}
export interface ITableData {
  deptId: number;
  deptName: string;
  type: IDictRes;
  leader: string;
  phone: string;
  updateTime: string;
  parentId: number;
  children?: ITableData[];
}
export interface ITypeState {
  tableData: ITableData[];
  loading: boolean;
}

export interface IFormState {
  parentId: number | null;
  type: string;
  deptName: string;
  leader: string;
  phone: string;
  deptId: number | null;
}

export type FormStateKeys = keyof IFormState;

export interface ITreeSelectData {
  deptName: string;
  deptId: number;
  children?: ITreeSelectData[];
}

export interface IStateAdd {
  deptTreeData: ITreeSelectData[];
}
